from django.db import models


# Create your models here.


#年级表
class Grade(models.Model):
    name = models.CharField(max_length=50)
    class Meta:
        db_table = 'grade'
        verbose_name = '年级表'
    def __str__(self):
        return self.name



#课程表
class ClassSchedule(models.Model):
    name = models.CharField(max_length=50)
    gradeid = models.ForeignKey(Grade,on_delete=True)
    class Meta:
        db_table = 'classschedule'
        verbose_name = '课程表'
    def __str__(self):
        return self.name


